#include "stdafx.h"
#include "CXMLParser.h"




CXMLParser::CXMLParser(struct IValueStore * pTags, struct IValueStore * pAttrs, XBOOL fStrict)
{

	NOTIMPL

}

HRESULT CXMLParser::LoadXml(struct IValueStore * pTags, struct IValueStore * pAttrs, XUINT32 cSource, XUINT8 * pSource, CXString * pstrExpectedDocType, CXString * pstrExpectedDTDUrl, XBOOL fStrict, CValue & valueRoot, XBOOL fIgnoreDocumentTag)
{

	NOTIMPL

}

HRESULT CXMLParser::LoadXml(struct IValueStore * pTags, struct IValueStore * pAttrs, XUINT32 cSource, XUINT8 * pSource, CValue &)
{

	NOTIMPL

}

HRESULT CXMLParser::StripLeadingWhitespace(XUINT32 * cSource, XUINT8 * * pSource)
{

		bool bUnicode; // [sp+8h] [bp-18h]@1
		XINT32 nEndian; // [sp+Ch] [bp-14h]@1
		XUINT8 *pTempSource; // [sp+10h] [bp-10h]@1
		XINT32 curr_wchar; // [sp+14h] [bp-Ch]@5
	
		pTempSource = 0;
		bUnicode = (*cSource & 1) == 0;
		nEndian = 0;
		if ( (*cSource & 1) == 0 )
		{
			pTempSource = *pSource;
			while ( 1 )
			{
				while ( 1 )
				{
					if ( nEndian > 0 || *cSource <= 2 )
					{
						*pSource = pTempSource;
						goto EndianMarked;
					}
					curr_wchar = *(XCHAR *)pTempSource;
					if ( curr_wchar > (signed int)0xA00u )
						break;
					if ( curr_wchar == 0xA00 )
						goto LABEL_25;
					if ( curr_wchar > 0x20 )
					{
						if ( curr_wchar == 0xA0 )
							goto LABEL_24;
						if ( curr_wchar != 0x900 )
							goto LABEL_26;
	LABEL_25:
						nEndian = 2;
					}
					else
					{
						if ( curr_wchar == 0x20 )
							goto LABEL_23;
						if ( curr_wchar < 9 || curr_wchar > 10 && curr_wchar != 13 )
							goto LABEL_26;
	LABEL_24:
						nEndian = 1;
					}
				}
				if ( curr_wchar > (signed int)0xA000u )
				{
					if ( curr_wchar == 0xFEFF || curr_wchar == 0xFFFE )
						goto LABEL_23;
	LABEL_26:
					if ( !nEndian )
						bUnicode = 0;
					nEndian = 3;
				}
				else
				{
					if ( curr_wchar == 0xA000 || curr_wchar == 0xD00 )
						goto LABEL_25;
					if ( curr_wchar != 0x2000 )
						goto LABEL_26;
	LABEL_23:
					nEndian = -1;
					pTempSource += 2;
					*cSource -= 2;
				}
			}
		}
	EndianMarked:
		if ( bUnicode )
		{
			if ( nEndian == 1 )
			{
				while ( *cSource && xisspace(*(XCHAR *)pTempSource) )
				{
					pTempSource += 2;
					*cSource -= 2;
				}
				*pSource = pTempSource;
			}
			else
			{
				if ( nEndian == 2 )
				{
					while ( *cSource && xisspace(((XUINT8)**pSource << 8) | (XUINT8)(*pSource)[1]) )
					{
						*pSource += 2;
						*cSource -= 2;
					}
				}
			}
		}
		else
		{
			while ( *cSource && xisspace((XUINT8)**pSource) )
			{
				++*pSource;
				--*cSource;
			}
		}
		return 0;

}

HRESULT CXMLParser::StartDocument()
{

	NOTIMPL

}

HRESULT CXMLParser::EndDocument()
{

	NOTIMPL

}

HRESULT CXMLParser::StartElement(XUINT32 cName, XCHAR * pName)
{

	NOTIMPL

}

HRESULT CXMLParser::EndElement()
{

	NOTIMPL

}

HRESULT CXMLParser::Attribute(XUINT32 cName, XCHAR * pName, XUINT32 cValue, XCHAR * pValue)
{

	NOTIMPL

}

HRESULT CXMLParser::Characters(XUINT32 cString, XCHAR * pString)
{

	NOTIMPL

}
